Skip to content

test: give the control-error status cases room for a stalled runner - #82

Merged
youdie006 merged 2 commits into
mainfrom
fix/flaky-control-error-test
Oct 30, 2026
Merged

youdie006 merged 2 commits into
mainfrom
fix/flaky-control-error-test

Conversation

@youdie006

Copy link
Copy Markdown
Owner

Problem

tests/browser-slow-vs-dead.test.ts > "does not treat an HTTP control error as a stopped browser" gave getChatGptBrowserStatus a 300 ms budget against a local server that answers at once. On macOS Intel CI the runner stalled past that, the fetch timed out, and the status read browser_slow instead of browser_control_unavailable. This failed three times:

Run Branch Test duration
40634869467 main, 10-28 336 ms
40819976622 main, 10-29 (two cases) 630 ms and 1622 ms

Change

Test only. These cases now use a 10 s budget, because the budget is not what they test. The slow-port case still uses 300 ms against a server that waits 2 s, and the tiny-timeout case still uses 10 ms. No CHANGELOG entry: nothing user-visible changes.

Verification

  • A scratch test (not committed) blocked the event loop for 500 ms right after the call:
    • with 300 ms the status was browser_slow, the CI failure;
    • with 10 s it was browser_control_unavailable.
  • tsc. The file passes (8 tests).
  • CPU load alone did not reproduce the failure locally (12 busy processes, or pinning to one CPU).

"does not treat an HTTP <code> control error as a stopped browser" gave
getChatGptBrowserStatus a 300 ms budget against a server that answers at
once. On macOS Intel CI the runner stalled past that three times
(2026-10-28 and 10-29; the tests took 336-1622 ms), the fetch timed out,
and the status read browser_slow instead of browser_control_unavailable,
failing main and PR runs.

The budget is not what these cases test, so it is now 10 s. A scratch
test that blocks the event loop for 500 ms right after the call gives
browser_slow at 300 ms and browser_control_unavailable at 10 s.

Verified: tsc; the file passes (8 tests). Not reproduced by CPU load
alone locally (12 busy processes, or pinning to one CPU).

Claude-Session: https://claude.ai/code/session_01EMqNwnnhHXznd2P2PDsaDV
@github-actions

Copy link
Copy Markdown

What this touches

  • tests

1 file(s), 5 line(s) changed. Tests changed.

This is an automated first pass, not a review. CI is the gate; a person decides.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-30T08:48:59.955238Z 9fef9c9 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@youdie006
youdie006 merged commit d41f9d1 into main Oct 30, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant